A wellbore can be drilled through a subterranean formation for extracting hydrocarbons (e.g., oil or gas) from the subterranean formation. It can be desirable to determine various characteristics of the wellbore prior to, or concurrent with, drilling the wellbore. For example, a well operator can use the determined characteristics to make judgments about the wellbore, to detect the existence of any potential hazards, or to perform other functions.